﻿using System.Windows;
using System.Windows.Controls;
using ProjectBilling.Application;
using ProjectBilling.DataAccess;

namespace ProjectBilling.UI.SL
{
    public partial class MainPage : UserControl
    {
        private IProjectsModel _model;
        public MainPage()
        {
            InitializeComponent();
            _model = new ProjectsModel(new DataServiceStub());
        }

        private void Button_Click(object sender,
            RoutedEventArgs e)
        {
            ProjectsView view = new ProjectsView();
            view.DataContext = new ProjectsViewModel(_model);
            MainStackPanel.Children.Add(view);
        }
    }
}
